package com.tianci.appstore.ui.data;

import java.util.ArrayList;
import java.util.List;

/**
 * 应用详情data
 **/
public class SkyAppDetailData {
    private String id;
    private String iconUrl;
    private String title;
    private String pkgName;
    private String version;
    public String updateInfo;
    private List<String> infoList;
    private AppStatus appStatus;
    private String introduction;
    private List<String> screenShotsPreview;
    private List<String> screenShotsBig;
    private List<String> screenShots;
    private String cornerIcon;


    public enum AppStatus {
        NOT_DOWNLOADED,
        WAITING,
        DOWNLOADING,
        DOWNLOAD_PAUSED,
        DOWNLOADED,
        INSTALLING,
        UNINSTALLING,
        INSTALLED,
        INSTALLED_WITH_CAN_NOT_BE_UNINSTALLED,
        HAS_NEW_VERSION,
        HAS_NEW_VERSION_WITH_CAN_NOT_BE_UNINSTALLED,
    }

    public enum AppAction {
        ACTION_NULL,        // 不做任何操作
        ACTION_DOWNLOAD,    // 下载
        ACTION_PAUSE,       // 暂停
        ACTION_CONTINUE,    // 继续下载
        ACTION_CANCEL,      // 取消
        ACTION_INSTALL,     // 安装
        ACTION_DELETE,      // 删除
        ACTION_UNINSTALL,   // 卸载
        ACTION_LAUNCH,      // 打开
        ACTION_UPGRADE,     // 升级
        ACTION_PRIORITIZE   // 优先
    }

    public SkyAppDetailData(String id, String title, String iconUrl, AppStatus appStatus,
                            String introduction) {
        this.id = id;
        this.iconUrl = iconUrl;
        this.title = title;
        this.appStatus = appStatus;
        this.introduction = introduction;
    }


    public SkyAppDetailData(String id, String iconUrl, String title,
                            String pkgName, String version, String updateInfo,
                            List<String> infoList, AppStatus appStatus, String introduction,
                            List<String> screenShotsPreview, List<String> screenShotsBig,
                            List<String> screenShots, String cornerIcon) {
        super();
        this.id = id;
        this.iconUrl = iconUrl;
        this.title = title;
        this.pkgName = pkgName;
        this.version = version;
        this.updateInfo = updateInfo;
        this.infoList = infoList;
        this.appStatus = appStatus;
        this.introduction = introduction;
        this.screenShotsPreview = screenShotsPreview;
        this.screenShotsBig = screenShotsBig;
        this.screenShots = screenShots;
        this.cornerIcon = cornerIcon;
    }


    public void addInfo(String infoStr) {
        if (infoList == null)
            infoList = new ArrayList<String>();
        infoList.add(infoStr);
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getIconUrl() {
        return iconUrl;
    }

    public void setIconUrl(String iconUrl) {
        this.iconUrl = iconUrl;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getUpdateInfo() {
        return updateInfo;
    }

    public void setUpdateInfo(String updateInfo) {
        this.updateInfo = updateInfo;
    }

    public List<String> getInfoList() {
        return infoList;
    }

    public void setInfoList(List<String> infoList) {
        this.infoList = infoList;
    }

    public AppStatus getAppStatus() {
        return appStatus;
    }

    public void setAppStatus(AppStatus appStatus) {
        this.appStatus = appStatus;
    }

    public String getIntroduction() {
        return introduction;
    }

    public void setIntroduction(String introduction) {
        this.introduction = introduction;
    }

    public List<String> getScreenShotsPreview() {
        return screenShotsPreview;
    }

    public void setScreenShotsPreview(List<String> screenShotsPreview) {
        this.screenShotsPreview = screenShotsPreview;
    }

    public List<String> getScreenShotsBig() {
        return screenShotsBig;
    }

    public void setScreenShotsBig(List<String> screenShotsBig) {
        this.screenShotsBig = screenShotsBig;
    }

    public String getPkgName() {
        return pkgName;
    }

    public void setPkgName(String pkgName) {
        this.pkgName = pkgName;
    }


    public List<String> getScreenShots() {
        return screenShots;
    }


    public void setScreenShots(List<String> screenShots) {
        this.screenShots = screenShots;
    }


    public String getCornerIcon() {
        return cornerIcon;
    }


    public void setCornerIcon(String cornerIcon) {
        this.cornerIcon = cornerIcon;
    }


}   
